#! /usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2020-03-30 19:52
# @Author : youngchaolin

print()

'''
with open() 
'''

# 不用手动关闭文件句柄
with open('文件的读.txt',encoding='utf-8') as f1:
    print(f1.read())

# 一个with，可以操作多个open
with open('文件的读.txt',encoding='utf-8',mode='r') as f1,open('文件的写.txt',encoding='utf-8',mode='w') as f2:
    print(f1.read())
    f2.write('打开文件的另外一种方式')